package com.jkc.xh.models;

import android.text.TextUtils;

import java.io.Serializable;

/**
 * Created by zhangbreeze on 15/11/17.
 */
public class FavModel implements Serializable {
    public String id;
    public String stock_code;
    public String stock_name;
    public String last_price;
    public String close_price;
    public String incr_percent;
    public String halt_flag;

    /**
     * 停牌  true 已经停牌
     *
     * @return
     */
    public boolean isStop() {
        return "1".equals(halt_flag);
    }

    public boolean isProfit() {
        if (TextUtils.isEmpty(incr_percent)) {
            return true;
        }
        return !incr_percent.startsWith("-");
    }
    /*
                "id" : "自选股序号",
                "stock_code" : "证券代码",
                "stock_name" : "证券名称",
                "last_price" : "现价",
                "close_price" : "昨收",
                "incr_percent" : "涨幅，比如3%"

    * */
}
